package com.neuedu.service.impl;

import com.neuedu.dao.AdminDao;
import com.neuedu.dao.AdminDaoImpl;
import com.neuedu.entity.Admin;
import com.neuedu.service.AdminService;

import java.util.List;

public class AdminServiceImpl implements AdminService {
    AdminDao adminDao = new AdminDaoImpl();
    @Override
    public List<Admin> list() {
        return adminDao.list();
    }

    @Override
    public boolean add(Admin admin) {
        return adminDao.add(admin) > 0;
    }

    @Override
    public Admin getById(Integer id) {
        return adminDao.getById(id);
    }

    @Override
    public boolean update(Admin admin) {
        return adminDao.update(admin) > 0;
    }

    @Override
    public boolean del(Integer id) {
        return adminDao.del(id) > 0;
    }
}
